<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/page/public/taglib.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户基本信息</title>
 <%@ include file="/WEB-INF/page/public/contentmeta.jsp"%>
 <link rel="stylesheet" href="/plugins/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="/css/form.css">
</head>
<body>
<div class="admin-form" >
			<form class="layui-form" action="/user/saveuserinfopage" method="post">
				<div class="form-left">
					<c:if test="${userobj==null}">
					<div class="layui-form-item">
						<label class="layui-form-label"><font color="red">*</font>账号 : </label>
						<div class="layui-input-block">
							<input type="text"  id="account" name="account" 	lay-verify="required" value=""   autocomplete="off" class="layui-input">
						</div>
					</div>
					</c:if>
					<div class="layui-form-item">
						<label class="layui-form-label"><font color="red">*</font>姓名 : </label>
						<div class="layui-input-block">
							<input type="text"  id="name" name="name" 	lay-verify="required" value="${userobj.info.name}"   autocomplete="off" class="layui-input">
							<input type="hidden"   name="id"   value="${userobj.info.id}"   >
							<input type="hidden"   name="uid"   value="${userobj.info.uid}"   >
						</div>
					</div>
					<div class="layui-form-item department">
						<label class="layui-form-label"><font color="red">*</font>部门 : </label>
						<div class="layui-input-inline">
							<select   name="deptid" lay-verify="required">
									 <dic:dp value="${userobj.info.deptid}" type="2"/>
							</select>
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">身份证 : </label>
						<div class="layui-input-block">
							<input type="text" name="cardid"  value="${userobj.info.cardid}" placeholder="" autocomplete="off" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">工作职务 : </label>
						<div class="layui-input-block">
							<input type="text" name="school" value="${userobj.info.school}"   autocomplete="off" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label"><font color="red">*</font>手机 : </label>
						<div class="layui-input-inline">
							<input type="tel" name="phone" value="${userobj.info.phone}"  lay-verify="phone" autocomplete="off" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">紧急联系人手机 : </label>
						<div class="layui-input-inline">
							<input type="tel" name="cuphone" value="${userobj.info.cuphone}" autocomplete="off" class="layui-input">
						</div>
					</div>
					
					<div class="layui-form-item">
						<label class="layui-form-label">现住地址  : </label>
						<div class="layui-input-inline">
							<input type="text" name="currentaddr" value="${userobj.info.currentaddr}"  autocomplete="off" class="layui-input">
						</div>
					</div>
				</div>
				<div class="form-right">
					<c:if test="${userobj==null}">
					<div class="layui-form-item">
						<label class="layui-form-label"><font color="red">*</font>密码 : </label>
						<div class="layui-input-block">
							<input type="text"  id="password" name="password" value=""   autocomplete="off" class="layui-input">
						</div>
					</div>
					</c:if>
					<div class="layui-form-item">
						<label class="layui-form-label">拨号账号 : </label>
						<div class="layui-input-inline">
							<input type="text"  id="nickname" name="nickname" value="${userobj.info.nickname}"   autocomplete="off" class="layui-input">
						</div>
						 <div class="layui-form-mid layui-word-aux">请填写拨号账号</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">性别 : </label>
						<div class="layui-input-block">
							<input type="radio"  name="sex" value="0" title="男" <c:if test="${userobj.info.sex==0}">checked="checked"</c:if> >
							<input type="radio"  name="sex" value="1" title="女" 	<c:if test="${userobj.info.sex==1}">checked="checked"</c:if>>
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">出生年月 : </label>
						<div class="layui-input-block">
							<input type="text"   id="date"  name="birthday" 	value="${userobj.info.birthday}"  placeholder="yyyy-mm-dd" autocomplete="off" class="layui-input" onclick="layui.laydate({elem: this})">
						</div>
					</div>
					<div class="layui-form-item department">
						<label class="layui-form-label">学历 : </label>
						<div class="layui-input-inline">
							<select 	id="education" name="education">
											<option value="0"
												<c:if test="${userobj.info.education==0}">selected</c:if>>不限</option>
											<option value="1"
												<c:if test="${userobj.info.education==1}">selected</c:if>>初中</option>
											<option value="2"
												<c:if test="${userobj.info.education==2}">selected</c:if>>高中</option>
											<option value="3"
												<c:if test="${userobj.info.education==3}">selected</c:if>>中专</option>
											<option value="4"
												<c:if test="${userobj.info.education==4}">selected</c:if>>大专</option>
											<option value="5"
												<c:if test="${userobj.info.education==5}">selected</c:if>>本科</option>
											<option value="6"
												<c:if test="${userobj.info.education==6}">selected</c:if>>硕士</option>
											<option value="7"
												<c:if test="${userobj.info.education==7}">selected</c:if>>博士</option>
							</select>
						</div>
					</div>
				 
					<div class="layui-form-item">
						<label class="layui-form-label">户籍地址 : </label>
						<div class="layui-input-inline">
							<input type="text" name="address" value="${userobj.info.address}"  autocomplete="off" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">邮箱 : </label>
						<div class="layui-input-inline">
							<input type="text" name="email" value="${userobj.info.email}"   autocomplete="off" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">紧急联系人 : </label>
						<div class="layui-input-inline">
							<input type="text" name="contactuser"  value="${userobj.info.contactuser}"  autocomplete="off" class="layui-input">
						</div>
					</div>
				</div>
				<div class="layui-form-item layui-form-text">
					<label class="layui-form-label">备注</label>
					<div class="layui-input-block">
						<textarea placeholder="请输入内容"  name="remark" class="layui-textarea">${userobj.info.remark}</textarea>
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-input-block">
						<button class="layui-btn" lay-submit="" lay-filter="demo1">保存</button>
					</div>
				</div>
			</form>
		</div>
 		<script>
			layui.use(['form', 'layedit', 'laydate'], function() {
				var form = layui.form(),
					layer = layui.layer,
					laydate = layui.laydate;

			 
				
				var msg ="${success}";
				if(msg.length>0){
					layer.msg(msg,{icon: 1});
				}
				//自定义验证规则
			/* 	form.verify({
					title: function(value) {
						if(value.length < 5) {
							return '姓名至少得2个字符啊';
						}
					},
					pass: [/(.+){6,12}$/, '密码必须6到12位'],
					content: function(value) {
						layedit.sync(editIndex);
					}
				}); */

				//监听提交
				/* form.on('submit(demo1)', function(data) {
					layer.alert(JSON.stringify(data.field), {
						title: '最终的提交信息'
					})
					return false;
				}); */
			});
		</script>

 
</body>
</body>

</html>